<?php

class Core_Form_Admin_Settings_General_Mail extends Core_Form_Admin_Settings_Base
{
    protected function _init()
    {

        $this -> setName('form_settings_mail') -> setTitle('@self') -> setDesc('@self');

        $this -> addElement('@title', 'site_mail_from-name', array(
            'value' => 'site admin',
            'label' => '@self',
            'desc' => '@self',
        ));

        $this -> addElement('@title', 'site_mail_from-email', array(
            'value' => 'admin@example.com',
            'label' => '@self',
            'desc' => '@self',
        ));

        $this -> addElement('@title', 'site_mail_reply-name', array(
            'value' => 'no reply',
            'label' => '@self',
            'desc' => '@self',
        ));

        $this -> addElement('@title', 'site_mail_reply-email', array(
            'value' => 'no-reply@example.com',
            'label' => '@self',
            'desc' => '@self',
        ));

        $this -> addElement('@radio', 'site_mail_cron', array(
            'multiOptions' => array(
                'on' => 'yes',
                'off' => 'no'
            ),
            'value' => 'on',
            'label' => '@self',
            'desc' => '@self',
        ));

        $this -> addElement('@title', 'site_mail_cron-limit', array(
            'value' => 25,
            'label' => '@self',
            'desc' => '@self',
        ));

        $this -> addElement('@select', 'site_mail_adapter', array(
            'multiOptions' => array(
                'smtp' => 'SMTP',
                'mail' => 'built in php mail function.'
            ),
            'value' => 'smtp',
            'label' => '@self',
            'desc' => '@self',
        ));

        $this -> addElement('@title', 'site_mail_smtp-host', array(
            'value' => 'www.example.com',
            'label' => '@self',
            'desc' => '@self',
        ));

        $this -> addElement('@title', 'site_mail_smtp-port', array(
            'value' => 25,
            'label' => '@self',
            'desc' => '@self',
        ));

        $this -> addElement('@radio', 'site_mail_smtp-authenticate', array(
            'multiOptions' => array(
                'on' => 'yes',
                'off' => 'no'
            ),
            'value' => 'off',
            'label' => '@self',
            'desc' => '@self',
        ));

        $this -> addElement('@title', 'site_mail_smtp-username', array(
            'label' => '@self',
            'desc' => '@self',
        ));

        $this -> addElement('@title', 'site_mail_smtp-password', array(
            'label' => '@self',
            'desc' => '@self',
        ));

        $this -> addElement('@radio', 'site_mail_smtp-security', array(
            'multiOptions' => array(
                'ssl' => 'ssl',
                'tls' => 'tsl',
                'none' => 'none',
            ),
            'value' => 'ssl',
            'label' => '@self',
            'desc' => '@self',
        ));

        /**
         * buttons
         */
        $this -> addElement('@group', 'buttons');

        $this -> getElement('buttons') -> addElement('@submit', '_submit') -> addElement('@cancel', '_cancel');
    }

}
